package com.aiyige.page.edituserinfo.model;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by zhuyakun on 2017/11/1.
 */

public class Province {
    private String id;
    private String name;
    private List<City> city;

    public Province() {
        id = "";
        name = "";
        city = new LinkedList<>();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<City> getCity() {
        return city;
    }

    public void setCity(List<City> city) {
        this.city = city;
    }

    public static class City {
        private String id;
        private String name;
        private String shortName;
        private String code;
        private String pinyin;
        private double lng;
        private double lat;
        private String cities;

        public City() {
        }

        private City(Builder builder) {
            setId(builder.id);
            setName(builder.name);
            setShortName(builder.shortName);
            setCode(builder.code);
            setPinyin(builder.pinyin);
            setLng(builder.lng);
            setLat(builder.lat);
            setCities(builder.cities);
        }

        public static Builder newBuilder() {
            return new Builder();
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getShortName() {
            return shortName;
        }

        public void setShortName(String shortName) {
            this.shortName = shortName;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getPinyin() {
            return pinyin;
        }

        public void setPinyin(String pinyin) {
            this.pinyin = pinyin;
        }

        public double getLng() {
            return lng;
        }

        public void setLng(double lng) {
            this.lng = lng;
        }

        public double getLat() {
            return lat;
        }

        public void setLat(double lat) {
            this.lat = lat;
        }

        public String getCities() {
            return cities;
        }

        public void setCities(String cities) {
            this.cities = cities;
        }


        public static final class Builder {
            private String id;
            private String name;
            private String shortName;
            private String code;
            private String pinyin;
            private double lng;
            private double lat;
            private String cities;

            private Builder() {
                id = "";
                name = "";
                shortName = "";
                code = "";
                pinyin = "";
                lng = 0;
                lat = 0;
                cities = "";
            }

            public Builder id(String id) {
                this.id = id;
                return this;
            }

            public Builder name(String name) {
                this.name = name;
                return this;
            }

            public Builder shortName(String shortName) {
                this.shortName = shortName;
                return this;
            }

            public Builder code(String code) {
                this.code = code;
                return this;
            }

            public Builder pinyin(String pinyin) {
                this.pinyin = pinyin;
                return this;
            }

            public Builder lng(double lng) {
                this.lng = lng;
                return this;
            }

            public Builder lat(double lat) {
                this.lat = lat;
                return this;
            }

            public Builder cities(String cities) {
                this.cities = cities;
                return this;
            }

            public City build() {
                return new City(this);
            }
        }
    }
}
